# Copyright 2006 The Android Open Source Project

# XXX using libutils for simulator build only...
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)


LOCAL_SRC_FILES:= 	broncho-ril.c  ril-dev.c   ril-mm.c   ril-sms.c  ril-stk.c	\
			ril-cc.c  ril-gprs.c  ril-sim.c  ril-ss.c ril-srs.c ril-client.c

LOCAL_SHARED_LIBRARIES := \
	libcutils libutils libril

# for asprinf
LOCAL_CFLAGS := -D_GNU_SOURCE -I$(TOPDIR)hardware/ril/libril

#if hardware flow
LOCAL_CFLAGS += -DUSE_CRTSCTS
LOCAL_PRELINK_MODULE := false
LOCAL_C_INCLUDES := $(KERNEL_HEADERS)

ifeq ($(TARGET_DEVICE),sooner)
  LOCAL_CFLAGS += -DOMAP_CSMI_POWER_CONTROL -DUSE_TI_COMMANDS 
endif

ifeq ($(TARGET_DEVICE),surf)
  LOCAL_CFLAGS += -DPOLL_CALL_STATE -DUSE_QMI
endif

ifeq ($(TARGET_DEVICE),dream)
  LOCAL_CFLAGS += -DPOLL_CALL_STATE -DUSE_QMI
endif

ifeq (foo,foo)
  #build shared library
  LOCAL_SHARED_LIBRARIES += \
	libcutils libutils
  LOCAL_LDLIBS += -lpthread
  LOCAL_CFLAGS += -DRIL_SHLIB
  LOCAL_MODULE_TAGS := eng 
  LOCAL_MODULE:= libm1190-gsm-ril
  include $(BUILD_SHARED_LIBRARY)
else
  #build executable
  LOCAL_SHARED_LIBRARIES += \
	libril
  LOCAL_MODULE:= m1190-gsm-ril
  include $(BUILD_EXECUTABLE)
endif

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

include $(BUILD_MULTI_PREBUILT)

